<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <h4>以下哪个是通过类名获取元素的方法</h4>
    <p style="background-color: cornflowerblue;">document.getElementByClassName</p>
    <p>document.getElementById</p>
    <p>document.createElement</p>
    <p>window.getComputedStyle</p>
</body>
</html>
